package com.wtwd.campus.jdzc.service.impl;

import com.wtwd.campus.jdzc.dao.JdzcInformationMapper;
import com.wtwd.campus.jdzc.entity.Information;
import com.wtwd.campus.jdzc.service.JdzcInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author mjy
 * @date 2022/02/16
 * @description
 */
@Service
public class JdzcInformationServiceImpl implements JdzcInformationService {

    @Autowired
    private JdzcInformationMapper jdzcInformationMapper;


    @Override
    public Long getBiggestTimeBySchoolId(Integer schoolId) {
        return jdzcInformationMapper.getBiggestTimeBySchoolId(schoolId);
    }

    @Override
    public List<Information> getInformationByTimeAndSchoolId(Integer schoolId, Long time, Integer count) {
        Long end=time+1000*60*60*24;
        Integer min=count*10;
        return jdzcInformationMapper.getInformationByTimeAndSchoolId(schoolId,time,end,min);
    }


    @Override
    public Information getInformationById(Integer id) {
        return jdzcInformationMapper.getInformationById(id);
    }




}
